package eu.dominicum.ft.pd.mao.validator;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * Validation annotation to validate the properties countryId, country name and country code.
 *
 * @author Harry Klerks
 * @since 2013M1
 */
@Target({ElementType.ANNOTATION_TYPE, ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
@Constraint(validatedBy = NewOrExistingCountryValidator.class)
@Documented
public @interface NewOrExistingCountry {

    /**
     * .
     *
     * @return String
     */
    String message() default
            "Als er geen bestaand Land is geselecteerd dan moet er een nieuwe worden gemaakt";

    /**
     * .
     *
     * @return
     */
    Class<?>[] groups() default {};

    /**
     * .
     *
     * @return Class<? extends Payload>[]
     */
    Class<? extends Payload>[] payload() default {};


}
